﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
using Abp.Application.Services.Dto;
using Abp.AutoMapper;
using Abp.Domain.Entities.Auditing;
using AutoMapper;
using FwProject.ShoppingMall.Com;

namespace FwProject.Com.Dto
{
    /// <summary>
    /// app订单模型
    /// </summary>
    [AutoMap(typeof(ShopOrder))]
    public class ShopOrderAppDto : EntityDto<Guid>
    {
        /// <summary>
        /// 用户id
        /// </summary>
        [Display(Name = "用户编号")]
        public long UserId { get; set; }

        /// <summary>
        /// 订单编号
        /// </summary>
        [Display(Name = "订单号")]
        public string OrderNumber { get; set; }

        /// <summary>
        /// 支付状态
        /// </summary>
        [Display(Name = "支付状态")]
        public PayStatus PayStatus { get; set; } = PayStatus.未支付;

        /// <summary>
        /// 支付方式
        /// </summary>
        [Display(Name = "支付方式")]
        public PayType PayType { get; set; } = PayType.微信支付;

        /// <summary>
        /// 发货状态
        /// </summary>
        public DeliveryStatus DeliveryStatus { get; set; } = DeliveryStatus.未发货;

        /// <summary>
        /// 总支付金额
        /// </summary>
        [Display(Name = "总支付金额")]
        public decimal PayTotal { get; set; } = 0m;

        /// <summary>
        /// 优惠金额
        /// </summary>
        [Display(Name = "优惠金额")]
        public decimal PyaPreferentia { get; set; } = 0m;

        /// <summary>
        /// 应付总金额
        /// </summary>
        [Display(Name = "应付总金额")]
        public decimal PayAmount { get; set; } = 0m;

        /// <summary>
        /// 收货地址
        /// </summary>
        [Display(Name = "收货地址")]
        public Guid ReceivingAddress { get; set; }

        #region 收货信息
        public string ActualReceivingName { get; set; }
        public string ActualReceivingTel { get; set; }
        public string ActualReceivingAddress { get; set; }
        #endregion

        /// <summary>
        /// 付款时间
        /// </summary>
        [Display(Name = "付款时间")]
        public DateTime? PayTime { get; set; }

        /// <summary>
        /// 买家留言
        /// </summary>
        [Display(Name = "买家留言")]
        public string OrderLeavingMessage { get; set; }
        /// <summary>
        /// 订单明细
        /// </summary>
        [IgnoreMap]
        public List<ShopOrderAppDetailsDto> ShopOrderAppDetailsDto { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public long? CreatorUserId { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public DateTime CreationTime { get; set; }
    }


}
